package com.youlai.boot.form.model.vo;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

/**
 * 动态单定义视图对象
 *
 * @author rabit
 * @since 2025-10-27 16:47
 */
@Getter
@Setter
@Schema( description = "动态单定义视图对象")
public class FormDefinitionVO implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "id")
    private Long id;
    @Schema(description = "表单编码")
    private String formCode;
    @Schema(description = "表单名称")
    private String formName;
    @Schema(description = "表单类型：custom(普通)/workflow(工作流)/survey(问卷)")
    private String formType;
    @Schema(description = "表单结构JSON，描述字段组件结构")
    private String formSchema;
    @Schema(description = "描述信息")
    private String description;
    @Schema(description = "版本号")
    private Integer version;
    @Schema(description = "版本号")
    private Integer maxVersion;
    @Schema(description = "状态：1启用 0停用 2历史版本")
    private Integer status;
    @Schema(description = "版本变更记录历史（版本1,b版本2，版本3）")
    private String versionHistory;
    @Schema(description = "创建人ID")
    private Long createBy;
    @Schema(description = "创建时间")
    private LocalDateTime createTime;
    @Schema(description = "修改人ID")
    private Long updateBy;
    @Schema(description = "更新时间")
    private LocalDateTime updateTime;
    @Schema(description = "父表单ID（历史版本源）")
    private Long parentFormId;
    @Schema(description = "是否激活（1是，0否）")
    private Integer active;
    @Schema(description = "排序字段")
    private Integer sort;
}
